/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 artifact_prop_ability.h

	$Header: /heroes4/artifact_prop_ability.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( ARTIFACT_PROP_ABILITY_H_INCLUDED )
#define ARTIFACT_PROP_ABILITY_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include "artifact_prop_effect.h"

enum t_creature_ability;
// ----------------------------------------------------------
// artifact which gives a creature ability
// ----------------------------------------------------------
namespace t_artifact_prop
{
	class t_give_ability : public t_base<k_artifact_effect_give_ability>
	{
	public:
		t_give_ability();
		t_give_ability( t_creature_ability ability, t_artifact_target target );

		virtual bool				accept( t_artifact_effect_visitor& visitor );
		virtual t_artifact_effect*	clone() const;
		static t_artifact_effect*	create();
		t_creature_ability			get_ability() const;
		virtual bool				read( std::streambuf& buffer );
		virtual bool				write( std::streambuf& buffer ) const;
	protected:
		t_creature_ability m_ability;
	};

	inline t_give_ability::t_give_ability()
	{
	}

	inline t_give_ability::t_give_ability( t_creature_ability ability, t_artifact_target target )
	{
		m_ability = ability;
		init( target, 0 );
	}


	inline t_creature_ability t_give_ability::get_ability() const
	{
		return m_ability;
	}
};


#endif // ARTIFACT_PROP_ABILITY_H_INCLUDED